package cn.com.code.design.rpc.config.spring;

import cn.com.code.design.rpc.config.spring.bean.ConsumerBean;
import cn.com.code.design.rpc.config.spring.bean.ProviderBean;
import cn.com.code.design.rpc.config.spring.bean.ServerBean;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

/**
 * @author zhengpei
 * @date 2021/11/5
 */
public class MyNameSpaceHandler extends NamespaceHandlerSupport {

  @Override
  public void init() {
    registerBeanDefinitionParser("consumer", new MyBeanDefinitionParser(ConsumerBean.class));
    registerBeanDefinitionParser("provider", new MyBeanDefinitionParser(ProviderBean.class));
    registerBeanDefinitionParser("server", new MyBeanDefinitionParser(ServerBean.class));
  }

}